#ifndef __INFRA_THREAD_H__
#define __INFRA_THREAD_H__

#include <linux/types.h>

#include "infra_comm.h"

typedef void *infra_thread_handle;

typedef void (*infra_thread_func)(void *user_data);
typedef int32_t (*infra_thread_wait_event_cb)(void *user_data);

typedef struct _infra_thread_config {
    int32_t                     wait_timeout;
    infra_thread_func           thread_func;
    infra_thread_wait_event_cb  wait_event_cb;
    void                        *user_data;
} infra_thread_config_t;

infra_thread_handle infra_thread_create(infra_thread_config_t *pthread_config);
int32_t infra_thread_destroy(infra_thread_handle handle);
int32_t infra_thread_wakeup(infra_thread_handle handle);

#endif  /* __INFRA_THREAD_H__ */